import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/layouts/default/index.vue'),
      children: [
        {
          path: '',
          name: 'home',
          component: () => import('@/views/home/index.vue'),
          meta: { title: '首页' }
        },
        {
          path: 'generator',
          name: 'generator',
          component: () => import('@/views/generator/index.vue'),
          meta: { title: '代码生成' }
        },
        {
          path: 'template',
          name: 'template',
          component: () => import('@/views/template/index.vue'),
          meta: { title: '模板管理' }
        }
      ]
    }
  ]
})

export default router 